package com.jmars.TS.entity;

import org.apache.commons.lang3.StringUtils;

/**
 * @Author: cly
 * @DateTime: 2021/12/23 15:59
 * @msg:
 */
public class    NribResult {
    private static final long serialVersionUID = 1L;


    public String code;         // 响应状态码  200-成功；其他-失败
    public String msg;          // 响应结果描述
    public int total;           // 总数量
    public int pageNum;         // 查询页
    public int pageSize;        // 每页数据条数
    public String body;         // 服务接口返回的 body (具体接口返回的数据 Json 字符串)

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    @Override
    public String toString() {
        String strBodyLength = "";
        if(StringUtils.isEmpty(body)){
            strBodyLength = "0";
        }
        else{
            strBodyLength =  "" + body.length();
        }

        return "NribResult{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                ", total=" + total +
                ", pageNum=" + pageNum +
                ", pageSize=" + pageSize +
//                ", body.length='" + strBodyLength + '\'' +
//                ", body='" + body.length() + '\'' +
                ", body='" + body + '\'' +
                '}';
    }
}
